<?php
$fp_work = fopen("../../config/work_id.txt",'r');
$work_id = fgets($fp_work);
fclose($fp_work);

//导入数据库配置文件
	require("../../conn/conn.php");
	$sql_insert = "UPDATE `work_info` SET `work_status`='已完成' where `work_id` = $work_id";
	
	if(mysqli_query($conn,$sql_insert)){
		echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."任务已完成"."\"".")".";"."</script>";
		echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../stu_page/html/我的家教.php"."\""."</script>";
	}else{
		echo "bad";
	}
